/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package entitys;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;

/**
 *
 * @author Amauri
 */
@Entity
public class HistoricoPartida implements Serializable {

    @SequenceGenerator(
            allocationSize = 1, 
            schema = "myschema",  
            name = "CD_HISTORICO_GENERATOR", 
            sequenceName = "PESSOA_SEQ"
    )
    @Id
    @GeneratedValue(
            strategy = GenerationType.SEQUENCE, 
            generator = "CD_HISTORICO_GENERATOR"
    )
    private Long ID;
    
    @ManyToOne(fetch = FetchType.LAZY)
    private Partida partida;
    
    @Column(columnDefinition = "TEXT")
    private String historico;

    public Partida getPartida() {
        return partida;
    }

    public void setPartida(Partida partida) {
        this.partida = partida;
    }

    public String getHistorico() {
        return historico;
    }

    public void setHistorico(String historico) {
        this.historico = historico;
    }

    public Long getID() {
        return ID;
    }

    public void setID(Long ID) {
        this.ID = ID;
    }
}